package com.bk.bands.template;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.bk.bands.model.Field;
import com.bk.bands.model.ShapeField;

/**
 * Created by IntelliJ IDEA.
 * User: SG0891787
 * Date: 3/7/12
 * Time: 9:02 PM
 */

@XmlRootElement(namespace = "http://com.bk.docs", name = "shape")
@XmlAccessorType(XmlAccessType.PUBLIC_MEMBER)
@XmlType(propOrder = {
   "border",
   "type"
})
public class XmlShape extends XmlField
{
   private ShapeField field = new ShapeField();

   public XmlShape() { }

   public XmlShape(XmlTemplate parentTemplate)
   {
      super(parentTemplate);
   }

   @Override
   protected Field delegate()
   {
      return field;
   }

   @XmlElement(namespace = "http://com.bk.docs")
   public XmlBorder getBorder()
   {
      return new XmlBorder(field.getBorder());
   }

   public void setBorder(XmlBorder value)
   {
      field.setBorder(value.getBorder());
   }

   @XmlElement(namespace = "http://com.bk.docs")
   public ShapeType getType()
   {
      return field.getType();
   }

   public void setType(ShapeType type)
   {
      field.setType(type);
   }
}
